package com.dataextend.service.impl;

import com.dataextend.mapper.cluster.RoleDao;
import com.dataextend.entity.RoleEntity;
import com.dataextend.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
    private RoleDao roleDao;

    @Override
    public int add(RoleEntity roleEntity) {
        return roleDao.add(roleEntity);
    }

    @Override
    public int update(RoleEntity roleEntity) {
        return roleDao.update(roleEntity);
    }

    @Override
    public void delete(Long id) {
        roleDao.delete(id);
    }

    @Override
    public RoleEntity queryById(Long id) {
        return roleDao.queryById(id);
    }

    @Override
    public List<RoleEntity> list(RoleEntity roleEntity) {
        return roleDao.list(roleEntity);
    }
}
